package cn.edu.scnu.springbootcinema.controller;

import cn.edu.scnu.springbootcinema.entity.RankingVO;
import cn.edu.scnu.springbootcinema.service.MovieService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/ranking")
public class RankingController {

    @Resource
    private MovieService movieService;

    @GetMapping("/getWeeklyRankings")
    public List<RankingVO> getWeeklyRankings() {
        return movieService.getWeeklyRankings();
    }

    @GetMapping("/getMonthlyRankings")
    public List<RankingVO> getMonthlyRankings() {
        return movieService.getMonthlyRankings();
    }
    @GetMapping("/getAllTimeRankings")
    public List<RankingVO> getAllTimeRankings() {
        return movieService.getAllTimeRankings();
    }
    @GetMapping("/getTopRatedRankings")
    public List<RankingVO> getTopRatedRankings() {
        return movieService.getTopRatedRankings();
    }
}
